package com.dhcc.DRGsHosp.facade.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.inject.Named;

import org.springframework.beans.factory.annotation.Autowired;

import com.dhcc.DRGsHosp.application.DrgsIndexCalApplication;
import com.dhcc.DRGsHosp.facade.EsRestTempFacade;

@Named("EsRestTempFacadeImpl")
public class EsRestTempFacadeImpl implements EsRestTempFacade {
	
	@Autowired
	private DrgsIndexCalApplication drgsIndexCalApplication;

/**
 *  @Description：根据索引获取es服务信息
 *  @Author：liuhongjun 
 *  @see com.dhcc.DRGsHosp.facade.EsRestTempFacade#getEsInfo(java.lang.String)
 */
	@Override
	public List<Map<String, Object>> getEsInfo(String esindex) {
		Map<String, Object> condition=new HashMap<>();
		String sql="select t.es_index,t.es_serverip,t.es_port,t.es_fildes,t.es_create_port from drgs.T_ESINDEX t where t.es_index='"+esindex+"' ";
		return drgsIndexCalApplication.excuteQueryForList(sql, condition);
	}




}
